In an automatic programming apparatus for creating NC data using an automatic programming language such as APT or FAPT,
(a) a part program based on the automatic programming language is created by defining points, straight lines and circular arcs using simple symbols (this is referred to as "figure definition"), and then defining a tool path using the defined points, straight lines and circular arcs (referred to as "motion statement definition"), and
(b) the part program based on the automatic programming language is subsequently converted, by using an NC data output table, into NC data comprising NC data (EIA codes or ISO codes) in a format capable of being executed by an NC unit. It should be noted that the tools used include, in addition to ordinary tools, the wire in a wire-cut electrical discharge machine, the laser beam in a laser processing machine, etc.
For example, in the creation of a part program for moving a tool (laser beam) RB along a profile comprising straight lines and circular arcs shown in FIG. 9, figure definition is performed by defining a tool starting point P.sub.1, cutting starting point P.sub.2, straight lines S.sub.1, S.sub.2 and circular arc C.sub.1 . . . as follows:
______________________________________ PART, @ REIDAI . . . (1) MCHN, LASER, ABS . . . (2) P.sub.1 = x.sub.1, y.sub.1 P.sub.2 = x.sub.2, y.sub.2 P.sub.3 = x.sub.3, y.sub.3 S.sub.1 = P.sub.2, P.sub.3 . . . (3) C.sub.1 = x.sub.4, y.sub.4, r.sub.1 . . . (4) P.sub.5 = x.sub.5, y.sub.5 S.sub.2 = P.sub.5, C.sub.1, B . . . (5) ______________________________________
Thereafter, by using these defined points, straight lines and circular arc, a motion statement is defined in automatic programming language, the motion statement being in line with the following and the tool path:
______________________________________ CUTTER, 0.3 . . . (6) S0800 . . . (7) TLLFT . . . (8) FROM, P.sub.1 . . . (9) RPD, TO, S.sub.1, P.sub.2 . . . (10) FCOD, 500 . . . (11) S.sub.1 C.sub.1 S.sub.2 . . . FINI PEND ______________________________________
When this is inputted to an automatic programming unit, the latter subsequently creates and outputs NC data having an EIA code or ISO code execution format automatically while referring to an NC data output table.
In the foregoing, (1) instructs the start of the part program, with "REIDAI" being the header.
(2) indicates the type of NC machine. "MILL" is used in case of milling, "TURN" in case of turning, "CUT" in case of a wire-cut electrical discharge machine, and "LASER" in case of laser machining. "ABS" indicates an absolute command. ("INCR" would be used for an incremental command.)
(3) signifies a straight line passing through points P.sub.2, P.sub.3.
(4) signifies a circular arc of center (x.sub.4,y.sub.4) and radius r.sub.1.
(5) signifies a lower tangent line (straight line) of two tangent lines passing through point P.sub.5 and contacting the circular arc c.sub.1. In the case of the upper tangent line, the alphabetic character A would be used instead of B.
(6) represents a beam command which commands a beam diameter of 0.3 mm.
(7) represents a command indicating that the laser power is 800W.
(8) is a command for offsetting the tool (laser beam) to the left of the direction of movement. ("TLRGT" would be used to offset the tool to the right of the direction of movement.)
(9) is a coordinate system setting command which indicates that the starting point is P.sub.1.
(10) is a command for positioning the tool in such a manner that the tool will contact the straight line S.sub.1 at point P.sub.2 without passing this straight line.
(11) is a velocity command indicating that the feed velocity is 500 mm/min.
When a tool path includes a corner, the tool feed velocity in the vicinity of the corner generally cannot be held constant because of the characteristics of the machine, etc. For example, if an i-th block b.sub.i and an (i+1)th block b.sub.i+1 of the tool path intersect perpendicularly, as shown in FIG. 10, the tool feed velocity is as shown in FIG. 11. Thus, deceleration and acceleration are required when passing the corner portion. In other words, in the vicinity of the corner, the feed velocity along the X axis is reduced from the commanded velocity V.sub.c and attains a value of zero, after which the feed velocity V.sub.y along the Y axis is increased to reattain the commanded velocity V.sub.c.
This deceleration and acceleration of feed at the corner portion has a deleterious effect upon the machining precision of the part. In particular, altering the feed velocity causes machining droop and has considerable influence upon machining precision in cases where a high machining velocity is required, as in laser machining.
Accordingly, it is necessary that an NC part program be created in such a manner that the machining precision at the corner portion does not suffer. To this end, the conventional practice is to check whether or not it is necessary to alter machining conditions at a corner portion each time and create a figure definition statement and motion definition statement depending on whether or not alteration of machining conditions is necessary. However, creating an NC program in accordance with this conventional method is a major undertaking.
Accordingly, in International Application PCT/JP87/00626 (international filing date: Aug. 26, 1987), the inventors proposed a novel method of creating an NC part program for laser machining However, this international application does not give a detailed disclosure concerning a method of specifying machining condition modification intervals and machining conditions.
An object of the present invention is to provide a method of simply creating an NC part program for laser machining in which machining precision at corner portions can be maintained.
Another object of the present invention is to provide a method of creating an NC part program for laser machining in which a machining condition modification interval and machining conditions can be simply specified and revised.